use crate::model::rocket::Rocket;

/// 火箭运行逻辑
pub trait RocketAutoLogic {
    fn run(&self, rocket: &mut Rocket, time: u128);
}

pub struct DefaultAutoLogic;

impl RocketAutoLogic for DefaultAutoLogic {
    fn run(&self, rocket: &mut Rocket, time: u128) {
        if time == 0 {
            rocket.ignition_all();
        }
    }
}
